package org.gbif.service;

import java.util.List;

/**
 * A generic manager for REST based CRUD services. 
 * It is pretty much simply a generic persistency manager (get/save/remove), 
 * but tries to keep the 4 CRUD actions separate, so other actions not related to persistency could be taken.
 * @author markus
 *
 * @param <T> The type of the model entity
 * @param <R> The type of the primary ID
 */
public interface RESTManager<T> {
	public T newInstance();
	public T create(T transientObj);
	public T read(String id);
	public void update(T persitentObj);
	public void delete(T persitentObj);
	public List<T> list();
}
